package com.neuedu.corejava.ch10test;

import java.util.Iterator;

public class LinkedList {

	public static void main(String[] args) {
	
		java.util.LinkedList<Students> linkedList=new java.util.LinkedList<Students>();
		Students students=new Students(1001,"lisi",'男',23);
		Students students2=new Students(1002,"xiaom",'女',22);
		Students students3=new Students(1003,"minmin",'男',22);
		
		linkedList.add(students);
		linkedList.add(students2);
		linkedList.add(students3);
		
		Iterator iterator=linkedList.iterator();
		while(iterator.hasNext()) {
			Object object=iterator.next();
			Students stu=(Students) object;
			System.out.println(stu);
		}
		System.out.println("==============================================");
		for (Students students4 : linkedList) {
			System.out.println(students4);
		}
		System.out.println("==============================================");
		for(int i=0;i<1;i++) {
			System.out.println(linkedList);
		}
	}
}
